@charset "utf-8";
@function r($px) {
    @return $px/50*1rem;
}

* {
    padding: 0;
    margin: 0;
    list-style: none;
}

html,
body {
    width: 100%;
    height: 100%;
}

.wrap {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
    background-color: skyblue;
    .bg_box {
        width: 100%;
        font-size: 0;
        position: absolute;
        left: 0;
        bottom: 0;
        transition: all 15s linear;
        .bg_img {
            width: 100%;
            img {
                width: 100%;
            }
        }
    }
    .ball_box {
        width: r(70);
        height: r(150);
        position: absolute;
        left: 0;
        bottom: 0;
        background: url(../img/game_ui/ball_bg.png) scroll no-repeat left top/cover;
        .ball_img {
            width: r(50);
            height: r(50);
            margin: r(4) auto 0;
            img {
                width: 100%;
                height: 100%;
                animation: ball_rotate 1s linear infinite;
            }
        }
    }
    //云
    .yun {
        width: r(60);
        height: r(60);
        position: absolute;
        top: r(-60);
        animation-name: yun_run;
        animation-timing-function: linear;
        img {
            width: 100%;
        }
    }
    //水
    .water {
        width: r(60);
        height: r(100);
        position: absolute;
        top: r(-100);
        animation-name: water_run;
        animation-timing-function: linear;
        img {
            width: 100%;
            height: 100%;
        }
    }
    //游戏时间
    .time_box {
        position: fixed;
        top: r(5);
        left: r(5);
        width: r(100);
        color: #fff;
        font-size: r(20);
        font-weight: bold;
        font-family: cursive;
    }
    //生命数
    .life_box {
        position: fixed;
        top: r(5);
        right: 0;
        width: r(100);
        color: #fff;
        font-size: r(20);
        font-weight: bold;
        font-family: cursive;
        text-align: center;
    }
    //当前关卡
    .level{
        position: fixed;
        top: r(5);
        left: 50%;
        transform: translateX(-50%);
        width: r(100);
        color: #fff;
        font-size: r(24);
        font-weight: bold;
        font-family: cursive;
        text-align: center;
    }
    //提示
    .tips {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0,0,0,.8);
        z-index: 999;
        display: none;
        .buttons {
            width: 80%;
            height: r(200);
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: url(../img/game_over/tips_bg.png) no-repeat left top/cover;
            text-align: center;
            padding-top: r(66);
            p {
                font-size: 20px;
                font-weight: bold;
                color: white;
                letter-spacing: r(4);
                margin-bottom: r(30);
                span{
                    padding-left: r(10);
                    padding-right: r(10);
                    color: #fbea27;
                }
            }
            .yes_no {
                width: 40%;
                height: r(75);
                display: inline-block;
                font-size: 0;
                img{
                    width: 100%;
                }
            }
        }
    }
}

@keyframes ball_rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes yun_run {
    from {
        top: r(-60);
    }
    to {
        top: 100%;
    }
}

@keyframes water_run {
    from {
        top: r(-100);
    }
    to {
        top: 100%;
    }
}